package com.adonis.ejoy.Item;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Comment {
	private Long pid;
    private Long uid;
	private String name;
	private String comment;
	private String img;
	private Long time;
	private SimpleDateFormat format = new SimpleDateFormat("y-M-d H:m:s");

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public String getTime() {
		return format.format(new Date(time));
	}
	public void setTime(Long time) {
		this.time = time;
	}

	@Override
	public String toString() {
		return "Comment{" +
				"pid=" + pid +
				", uid=" + uid +
				", name='" + name + '\'' +
				", comment='" + comment + '\'' +
				", img='" + img + '\'' +
				", time=" + time +
				", format=" + format +
				'}';
	}
}
